<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
	<title>Mytee</title>
	<link rel="stylesheet" type="text/css" href="/api/css/home.css">
	<link rel="stylesheet" href="/api/css/swiper.css"/>
	<script src="/api/js/swiper.min.js"></script>
	<script type="text/javascript" src="/api/js/jquery-1.8.1.min.js"></script>
</head>
<body>
<div class="goods">
	<div class="goods-detail">
		<div class="goods-detail-info">
			<h3>商品信息</h3>
			<table cellspacing="2" cellpadding="2">
				<tbody>
				@for($i=0;$i<sizeof($product_attr_maps);$i++)
					@if(($i%2)===0)
						<tr>
							@endif
							<td>{{isset($product_attr_maps[$i]->attr_name)?$product_attr_maps[$i]->attr_name:''}}：{{isset($product_attr_maps[$i]->attr_value)?$product_attr_maps[$i]->attr_value:''}}</td>
							@if(($i%2)!==0)
						</tr>
					@endif
				@endfor
				</tbody>
			</table>
		</div>
		@if(isset($temp_size_list)&&!empty($temp_size_list))
			<div class="goods-detail-size">
				<h3>尺码信息</h3>
				<div class="swiper-container swiper-container2">
					<div class="swiper-wrapper">
						@foreach($temp_size_list as $temp_size)
							<div class="swiper-slide">
								@foreach($temp_size as $size_name)
									<div class="cell">{{isset($size_name)?$size_name:''}}</div>
								@endforeach
							</div>
						@endforeach
					</div>
				</div>
				<div class="swiper-button-prev swiper-button-black"></div>
				<div class="swiper-button-next swiper-button-black"></div>
			</div>
		@endif
		@if(isset($temp_size_format->measure_method_image))
			<div class="goods-detail-meter">
				<h3>测量方式</h3>
				<img src="{{isset($temp_size_format->measure_method_image)?$temp_size_format->measure_method_image:''}}">
			</div>
		@endif
	</div>
</div>

<script type="text/javascript">
    var swiper1 = new Swiper('.swiper-container1', {
        pagination : '.swiper-pagination',
        paginationType: "bullets",
        slidesPerView: "auto",
        autoplay : 3000,
        freeMode: true,
        loop: true,
        observer:true,
        observeParents:true,
        autoplayDisableOnInteraction: false,
        freeMode : false,
		iOSEdgeSwipeDetection : true,
    });
    var swiper2 = new Swiper('.swiper-container2', {
        slidesPerView: "auto",
        direction: 'horizontal',
        freeMode: true,
        observer:true,
        observeParents:true,
        prevButton:'.swiper-button-prev',
        nextButton:'.swiper-button-next',
    });
    $(document).ready(function(){
        $(".colors-group > ul > li").click(function(){
            $(this).addClass('color-active').siblings().removeClass('color-active');
            var i = $(this).index();
            $('.slider-groups > .swiper-container').eq(i).addClass('active-swiper').siblings().removeClass('active-swiper');
            $('.goods-prices label').eq(i).addClass('active-label').siblings().removeClass('active-label');
        });
    })
</script>
</body>
</html>
